#ifndef PROJECT_H_
#define PROJECT_H_
#define DEBUG 1


/*	STRUCTURES	*/

typedef struct{
	char StateReg;
	char InterruptReg;
	int	 SystemTick;
	char SystemSeconds;
	char SystemMinutes;
	char SystemHours;
	char RX_Buffer[12];
	char RX_Buffer_length;
	char temp;
}SystemState;

/*	INCLUDES	*/

#include "msp430f2274.h"
#include "RFprotocol.h"
#include "Serial.h"

#if DEBUG
#include <stdio.h>
#include <string.h>
#endif

/*  DEFINITIONS */

// SOME SYSTEM STATE MODE DEFINITIONS

#define IDLE			0x01
#define TRANSMITTER		0x02
#define RECIEVER		0x04
#define UPDATE_MOTORS	0x08
#define POLL_GYRO		0x10
#define SYSTEM_CRUSH	0x20
#define INITIALIZE		0x40

// SOME SYSTEM INTERRUPT MODE DEFINITIONS
#define TIMER			0x01
#define SPI				0x02
#define UART			0x08

#define TRUE 1
#define FALSE 0

/*	MACROS  	*/

#define RED_LED_TOGGLE	{P1OUT ^= 0x01;}
#define GREEN_LED_TOGGLE{P1OUT ^= 0x02;}


#endif /*PROJECT_H_*/
